package mylibrary.thread.waitAndNotify;

public class MyThread_1 extends Thread {

	Object lock;

	public MyThread_1(Object o) {
		lock = o;
	}

	public void run() {
		try {
			synchronized (lock) {
				System.out.println("Enter Thread 1 and wait");
				lock.wait();
				System.out.println("be notified");
			}

		} catch (Exception e) {

		}
	}
}
